#!/bin/bash

# Path to the nginx log file
LOG_FILE="/path/to/nginx/access.log"

# Get today's date in the format used in the log file
TODAY=$(date +"%d/%b/%Y")

# Calculate QPS for today
awk -v date="$TODAY" '$4 ~ date {print $4}' $LOG_FILE | cut -d: -f2-4 | uniq -c | awk '{print $2, $1}'